import Vue from 'vue'
import VueRouter from 'vue-router'

import Login from '../components/Login.vue'
import Register from '../components/Register.vue'
import MyPage from '../components/MyPage.vue'
import Home from '../views/Home.vue'
import shopping from '../views/shopping.vue'
import Buyer from '../components/Buyer.vue'
import Wishcard from '../components/Wishcard.vue'
import WishcardResult from '../components/WishcardResult.vue'
import merchant from '../components/merchant.vue'
import Addlist from '../components/Addlist.vue'
import Liststate from '../components/Liststate.vue'
import Selling from '../views/Selling.vue'


Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Index',
        redirect: '/Home'
    }, {
        path: '/shopping',
        component: shopping
    }, {
        path: '/Selling',
        component: Selling
    }, {
        path: '/Buyer',
        component: Buyer
    }, {
        path: '/Wishcard',
        component: Wishcard
    }, {
        path: '/WishcardResult',
        component: WishcardResult
    }, {
        path: '/merchant',
        component: merchant
    }, {
        path: '/Addlist',
        component: Addlist
    }, {
        path: '/Liststate',
        component: Liststate
    },

    {
        path: '/login',
        component: Login
    },

    {
        path: '/register',
        component: Register
    },
    {
        path: '/MyPage',
        component: MyPage,
    },
    {
        path: '/Home',
        component: Home,
    }

];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router